<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Show Heroes</title>
    <!-- 引入Bulma CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.3/css/bulma.min.css">
    <!-- 引入自定义CSS（如果有的话） -->
    <link rel="stylesheet" href="styles.css">
</head>
<body>

<section class="section">
    <div class="container">
        <h1 class="title is-centered">英雄列表</h1>
        <div class="buttons is-centered mt-4">
            <a th:href="@{addheroes}" class="button is-primary">添加英雄</a>
        </div>
        <table class="table is-striped is-bordered is-fullwidth">
            <thead>
            <tr>
                <th>英雄ID</th>
                <th>英雄名称</th>
                <th>英雄描述</th>
                <th>英雄生日</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="showHeroes : ${showHeroes}">
                <td><a th:href="@{'/heroes/' + ${showHeroes.heroId}}" class="has-text-link"><span th:text="${showHeroes.heroId}"></span></a></td>
                <td><a th:href="@{'/heroes/' + ${showHeroes.heroId}}" class="has-text-link"><span th:text="${showHeroes.name}"></span></a></td>
                <td th:text="${showHeroes.description}"></td>
                <td th:text="${showHeroes.birthday}"></td>
                <td>
                    <div class="buttons is-centered is-small">
                        <a th:href="@{'/heroes/update/' + ${showHeroes.heroId}}" class="button is-info is-small">更新</a>
                        <a th:href="@{'delete/' + ${showHeroes.heroId}}" class="button is-danger is-small">删除</a>
                        <a th:href="@{/skills/addskills}" class="button is-success is-small">添加技能</a>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</section>

</body>
</html>